#! /bin/bash

cd $SYSCPAR_ROOT/tests/event
make clean

vers='basic v1 v1ns'
nts=`seq 5`
logflops=23
filename='./input/exp2'

for v in `echo $vers`
do
	make precompile_$v
	log=event1_$v.log
	for lognets in {8..15}
	do
		nnets=$((2**$lognets))
		for nt in `echo $nts`
		do	
			echo -n "[nnets=$nnets,nt=$nt] " >> $log
			sed -i "s|int nnets = [0-9]*;|int nnets = $nnets;|" $filename
			echo -e '#include "'$filename'"'"\n" > ./wrapper
			make compile_$v build_$v		

			env VERBOSE=1 NT=$nt OUT=$log ./event_$v 50 m 0
		done
		echo -e '\n' >> $log
	done
	echo -e '\n' >> $log
done

